<style>
  #specil .form-group .control-label{
    width: 155px;
    margin-right: 0;
  }
  #specil .form-group{
    margin-right: 0;
  } 
</style>
<div ng-include src="'tpl/public/header.html?1'"></div>
<div id="specil">

  <form class="form-horizontal" role="form" name="form" novalidate ng-submit="infoSave()">

    <span ng-if="product.outProductId">外场</span>
    <input type="hidden" ng-model="product.outProductId">

    <div class="form-group" style="margin-bottom: 0;line-height: 35px">
      <label class="col-sm-2 control-label">
      </label>
      <span  class="col-sm-1">
        <input type="checkbox" ng-model="product.flagZhiding">置顶
      </span>
      <span class="col-sm-1">
        <input type="checkbox" ng-model="product.flagBaoxiao">包销
      </span>
      <span class="col-sm-1">
        <input type="checkbox" ng-model="product.flagZhutui">主推
      </span>
    </div>    

    <div class="form-group" ng-class="{'has-error':form.pName.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品简称
      </label>
      <div class="col-xs-9">
        <input type="text" class="form-control" autocomplete="off" value="" name="pName" ng-model="product.pName" required="required" placeholder="产品简称">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pFullName.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品全名
      </label>
      <div class="col-xs-9">
        <input type="text" class="form-control" autocomplete="off" value="" name="pFullName" ng-model="product.pFullName" required="required" placeholder="产品全称">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pAllIssuingScale.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        发行规模
      </label>
      <div class="col-xs-9">
        <input type="number" class="form-control" autocomplete="off" value="" name="pAllIssuingScale" ng-model="product.pAllIssuingScale" required="required" placeholder="发行规模,请填写数字，单位亿元">
        <span class="form-control-feedback">亿元</span>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pSaleTimeStartStr.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        起售时间
      </label>
      <div class="col-xs-9">
        <input type="date" class="form-control" autocomplete="off" value="" name="pSaleTimeStartStr" ng-model="product.pSaleTimeStartStr" required="required" placeholder="起售时间,格式如2014-09-01" ng-pattern="/^\d{4}-\d{2}-\d{2}$/">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pDueTime.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品期限
      </label>
      <div class="col-xs-9">
        <input type="number" class="form-control" autocomplete="off" value="" name="pDueTime" ng-model="product.pDueTime" required="required" placeholder="产品期限,请填写数字,单位月">
        <span class="form-control-feedback">月</span>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pInvestType.$invalid}">
      <label class="col-xs-2 control-label">投资领域</label>
      <div class="col-xs-9">
        <select class="form-control" ng-model="product.pInvestType" ng-options="m.value as m.text for m in investTypeModel" required="required"> </select>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pPaymentInterestType.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        付息方式
      </label>
      <div class="col-xs-9">
        <select class="form-control" name="pPaymentInterestType" ng-model="product.pPaymentInterestType" ng-options="m.value as m.text for m in paymentInterestTypeModel" required="required" placeholder="付息方式"> </select> 
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pPublicArea.$invalid}">
      <label class="col-xs-2 control-label">发行地区</label>
      <div class="col-xs-9">
        <select class="form-control" name="pPublicArea" ng-model="product.pPublicArea" ng-options="m.value as m.text for m in pPublicAreaModel" required="required" placeholder="发行地区"> </select> 
      </div>
    </div>

    <div class="form-group" ng-if="t=='03'" ng-class="{'has-error':form.pInvestOwner.$invalid}">
      <label class="col-xs-2 control-label">
        发行机构
      </label>
      <div class="col-xs-9">
        <input type="text" class="form-control" name="pInvestOwner" ng-model="product.pInvestOwner" placeholder="发行机构">
      </div>
    </div>

    <div class="form-group"  ng-if="t=='02'" ng-class="{'has-error':form.pInvestOwnerId.$invalid}">
      <label class="col-xs-2 control-label">
        发行机构
      </label>
      <div class="col-xs-9">
        <select class="form-control" name="pInvestOwnerId" ng-model="product.pInvestOwnerId" ng-options="m.id as m.cShortName for m in companys" 
        ng-show="t=='02'" placeholder="发行机构">
          <option value="">选择发行机构</option> 
        </select>
      </div>
    </div>





     <div class="form-group" ng-class="{'has-error':form.pMinimumAmountTmp.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品起购金额
      </label>
      <div class="col-xs-9">
        <input type="number" class="form-control" autocomplete="off" value="" name="pMinimumAmount" ng-model="product.pMinimumAmountTmp" required="required" placeholder="产品起购金额,请填写数字,单位万元">
        <span class="form-control-feedback">万元</span>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pProgressiveAmount.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        累进追加金额最小值
      </label>
      <div class="col-xs-9">
        <input type="number" class="form-control" autocomplete="off" value="" name="pProgressiveAmount" ng-model="product.pProgressiveAmountTmp" required="required" placeholder="累进追加金额最小值,请填写数字，单位万元">
        <span class="form-control-feedback">万元</span>
      </div>
    </div>



    <div class="form-group" ng-class="{'has-error':form.tjzl.$invalid}">
      <label class="col-xs-2 control-label"> 
        <span class="required">*</span>提交资料</label>
      <div class="col-xs-9">
        <label ng-repeat="tjzlitem in dictMap.tjzlModel">
            <input type="checkbox" name="tjzl" ng-model="allTjzls[tjzlitem.value]" value="{{tjzlitem.value}}">
            {{tjzlitem.text}}
        </label>
      </div>
    </div>



    <div class="form-group" ng-class="{'has-error':form.pEndEarlyIdentification.$invalid}">
      <label class="col-xs-2 control-label">项目是否可以提前结束</label>
      <div class="col-xs-9">
        <select class="form-control" name="pEndEarlyIdentification" ng-model="product.pEndEarlyIdentification" ng-options="m.value as m.text for m in dictMap['pEndEarlyIdentification']" required="required" placeholder=""> </select>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.pProjectOwner.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required"></span>
        融资方
      </label>
      <div class="col-xs-9">
        <input type="text" class="form-control" autocomplete="off" value="" name="pProjectOwner" ng-model="product.pProjectOwner" placeholder="融资方">
      </div>
    </div>

    <!-- 产品供应方公司，新加 -->
    <div class="form-group" ng-class="{'has-error':form.pAccessId.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品供应方公司
      </label>
      <div class="col-xs-9">
        <select class="form-control" name="pAccessId" ng-model="product.pAccessId" ng-options="m.id as m.accessCompany for m in supplierListOfProduct" required="required" ng-change="onSelectChange()" placeholder="产品供应方公司"></select> 
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':form.pAccessId.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        对接人
      </label>
      <div class="col-xs-9">
        <input type="text" class="form-control" readonly value="{{accessNameOfCompany}}" placeholder="对接人">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.title.$invalid}">
      <label class="col-xs-2 control-label">
        <span class="required">*</span>
        产品简介
      </label>
      
      <div class="col-xs-9">
        <div class="ueditor" config="config" ready="ready" ng-model="product.pSummary" style="height:300px;width:100%;" required></div>

      </div>
    </div>

    <div class="form-group" >
      <label class="col-xs-2 control-label">&nbsp;</label>
      <div class="col-xs-9">
        <input type="submit" class="btn btn-primary" value="保存" has-auth where="btn" who="PRODUCT_EDIT" owner="{{product.createBy}}"/>
      </div>
    </div> 

  </form>
</div>
<div load-script src="'/static/jquery.jUploader-1.01.js?5'" call-back="" charset="utf-8" ></div>